/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package vendingmachine;

/**
 *
 * Nama File    : Object.Java
 * Deskripsi    : deskripsi dan implementasi kelas Object yang merupakan benda yang dimasukkan melalui Object Receiver
 * Nama Pembuat : Muhammad Ghufron Mahfudhi (23512066) dan Jonathan Ery Pradana (23512038)
 * Hari/Tanggal : Senin / 26 November 2012
 */
public class Object {
    //atribut
    protected double size;         //diameter
    protected double weight;       //berat dalam gram
    protected double thick;        //ketebalan
    protected int serEdge;         //jumlah gerigi pada pinggiran
    
    //method

    //ctor
    public Object() {
        this.size = 0;
        this.weight = 0;
        this.thick = 0;
        this.serEdge = 0;
    }

    //ctor berparameter
    public Object(double size, double weight, double thick, int serEdge) {
        this.size = size;
        this.weight = weight;
        this.thick = thick;
        this.serEdge = serEdge;
    }
    
    public Object (Object O){
        this.size = O.size;
        this.weight = O.weight;
        this.thick = O.thick;
        this.serEdge = O.serEdge;
    }

    //getter
    public double getSize() {
        return size;
    }

    public double getWeight() {
        return weight;
    }

    public double getThick() {
        return thick;
    }

    public int getSerEdge() {
        return serEdge;
    }

    //setter
    public void setSize(double size) {
        this.size = size;
    }

    public void setWeight(double weight) {
        this.weight = weight;
    }

    public void setThick(double thick) {
        this.thick = thick;
    }

    public void setSerEdge(int serEdge) {
        this.serEdge = serEdge;
    }

    public boolean equals(Object obj) {
        return (this.size == obj.size) && (this.thick == obj.thick) && (this.weight == obj.weight) && (this.serEdge == obj.serEdge);
    }

    
    
}
